
public class HuffmanNode {
	
	private HuffmanNode leftNode;
	private HuffmanNode rightNode;
	private HuffmanNode fatherNode;
	private int priority;
	private Character symbol;
	
	public HuffmanNode(){
		priority = 0;
	}
	
	public HuffmanNode(char symbol){
		priority = 0;
		this.symbol = new Character(symbol);
	}	

	public HuffmanNode getLeftNode() {
		return leftNode;
	}
	public void setLeftNode(HuffmanNode leftNode) {
		this.leftNode = leftNode;
	}
	public HuffmanNode getRightNode() {
		return rightNode;
	}
	public void setRightNode(HuffmanNode rightNode) {
		this.rightNode = rightNode;
	}
	public HuffmanNode getFatherNode() {
		return fatherNode;
	}
	public void setFatherNode(HuffmanNode fatherNode) {
		this.fatherNode = fatherNode;
	}
	public Character getSymbol() {
		return symbol;
	}
	public void setSymbol(Character symbol) {
		this.symbol = symbol;
		setPriority(1);
	}
	public int getPriority() {
		return priority;
	}
	public void setPriority(int priority) {
		this.priority = priority;
	}
	
	public void increasePriority()
	{
		this.priority++;
	}
}
